package compute;

import java.lang.reflect.InvocationTargetException;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JToolBar;
import javax.swing.SwingUtilities;

public class Pratice1 extends JFrame {
	JMenuBar cd;
	JMenu cd1,cd2,cd3,cd4,cd5;
	JMenuItem cdx2,cdx3,cdx4,cdx5,cdx6,cdx7;
	JMenu jm;
	JMenuItem jm1,jm2;
	JToolBar gjt;
	JButton an1,an2,an3,an4,an5,an6;
	JTextArea wbk;
	JScrollPane gdt;
	public Pratice1() {
		gjt=new JToolBar();
		an1=new JButton();
		an1.setToolTipText("新建");
		an2=new JButton();
		an2.setToolTipText("打开");
		an3=new JButton();
		an3.setToolTipText("保存");
		an4=new JButton();
		an4.setToolTipText("另存为");
		an5=new JButton();
		an5.setToolTipText("复制");
		
		cd=new JMenuBar();
		cd1=new JMenu("文件（F）");
		cd1.setMnemonic('F');
		cd2=new JMenu("编辑（E）");
		cd2.setMnemonic('E');
		cd3=new JMenu("格式（O）");
		cd3.setMnemonic('O');
		cd4=new JMenu("查看（V）");
		cd4.setMnemonic('V');
		cd5=new JMenu("帮助（H）");
		cd5.setMnemonic('H');
		
		jm=new JMenu("新建");
		jm1=new JMenuItem("文件");
		jm2=new JMenuItem("模板");
		
		cdx2=new JMenuItem("打开");
		cdx3=new JMenuItem("保存");
		cdx4=new JMenuItem("另存为");
		cdx5=new JMenuItem("打印");
		cdx6=new JMenuItem("页面设置");
		cdx7=new JMenuItem("退出");
		
		wbk=new JTextArea();
		gdt=new JScrollPane(wbk);
		
		
		}

	public static void main(String[] args) throws InvocationTargetException, InterruptedException {
		SwingUtilities.invokeAndWait(new Runnable() {
			
			@Override
			public void run() {
				new Practice();
				
			}
		});

	}

}
